package com.gpStudy.design.single;

/**
 * 静态代码块，类第一次被初始化时 初始化对象
 */
public class HungrySingletonStatic {

    private HungrySingletonStatic(){}
    private static HungrySingletonStatic hungry = null;
    static {
        hungry = new HungrySingletonStatic();
    }

    public static HungrySingletonStatic getInstance(){
        return hungry;
    }

}
